package com.yuwj.chinaa.model.ModelImpl;

import android.app.Dialog;
import android.content.Context;
import android.text.TextUtils;
import android.text.format.Formatter;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.FileCallback;
import com.lzy.okgo.model.HttpHeaders;
import com.lzy.okgo.model.Progress;
import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.base.Request;
import com.orhanobut.logger.Logger;
import com.yuwj.chinaa.R;
import com.yuwj.chinaa.base.ConstantParam;
import com.yuwj.chinaa.base.ConstantURL;
import com.yuwj.chinaa.callback.ModelCallback;
import com.yuwj.chinaa.callback.OkgoDialogWithStringCallback;
import com.yuwj.chinaa.entity.EntityAppInfo;
import com.yuwj.chinaa.entity.EntityAssetDetailRecord;
import com.yuwj.chinaa.entity.EntityAssetGTEDetail;
import com.yuwj.chinaa.entity.EntityAssetGTEOverview;
import com.yuwj.chinaa.entity.EntityAssetGTKDetail;
import com.yuwj.chinaa.entity.EntityAssetGTKOverview;
import com.yuwj.chinaa.entity.EntityAssetsBag;
import com.yuwj.chinaa.entity.EntityBurseCoinNumber;
import com.yuwj.chinaa.entity.EntityBurseRecord;
import com.yuwj.chinaa.entity.EntityBurseRecordDetail;
import com.yuwj.chinaa.entity.EntityCommunity;
import com.yuwj.chinaa.entity.EntityCommunityLevelMember;
import com.yuwj.chinaa.entity.EntityComputeCodeEarningRecord;
import com.yuwj.chinaa.entity.EntityExercise;
import com.yuwj.chinaa.entity.EntityGeneralAuth;
import com.yuwj.chinaa.entity.EntityMyCommunity;
import com.yuwj.chinaa.entity.EntityMyComputeCode;
import com.yuwj.chinaa.entity.EntityNews;
import com.yuwj.chinaa.entity.EntityNotice;
import com.yuwj.chinaa.entity.EntityOrder;
import com.yuwj.chinaa.entity.EntityOrderDetail;
import com.yuwj.chinaa.entity.EntityOrderWithTrade;
import com.yuwj.chinaa.entity.EntityOtherAssets;
import com.yuwj.chinaa.entity.EntityPartnerApply;
import com.yuwj.chinaa.entity.EntityReceivingAddress;
import com.yuwj.chinaa.entity.EntityTradeOrderDeatil;
import com.yuwj.chinaa.entity.EntityTradePriceData;
import com.yuwj.chinaa.entity.EntityUser;
import com.yuwj.chinaa.model.IModel;
import com.yuwj.chinaa.util.GsonUtil;
import com.yuwj.chinaa.view.DownloadFileProgressDialog;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * MVP的M层,模型层实现类
 */

public class ModelImpl implements IModel {


    Object requestTag;//OKGO可以通过这个tag取消对应的请求

    public ModelImpl(Object requestTag) {
        this.requestTag = requestTag;
    }


    @Override
    public void xxxxxxxxxxxxxx应用相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void appInfo(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.appInfo;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAppInfo entityAppInfo = GsonUtil.json2Bean(data, EntityAppInfo.class);
                                if (ConstantParam.isUseTestData) {
                                    //测试
                                }
                                modelCallback.onAppInfoSuccess(entityAppInfo);
                            } else {
                                modelCallback.onAppInfoFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAppInfoFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAppInfoFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void appFeedback(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        final String url = ConstantURL.appServerHost + ConstantURL.appFeedback;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onAppFeedbackSuccess(data);
                            } else {
                                modelCallback.onAppFeedbackFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAppFeedbackFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAppFeedbackFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void appUploadFilesImage(String jsonParam, String uploadImg, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.UploadFilesImage;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        ArrayList<File> fileList = null;
        File f = new File(uploadImg);
        if (f.exists()) {
            fileList = new ArrayList<>();
            fileList.add(f);
        } else {
            return;
        }
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .isMultipart(true)
                .params(okgoParam)
//                .params("jsonparam", jsonParam)
                .addFileParams("file", fileList)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
//                                appServerHost = "http://120.77.35.188/api/";//APP应用服务器地址
                                int endIndex = ConstantURL.appServerHost.lastIndexOf("api");
                                String imgUrl = (ConstantURL.appServerHost.substring(0, endIndex)) + data;
                                modelCallback.appUploadFilesImageSuccess(imgUrl);
                            } else {
                                modelCallback.appUploadFilesImageFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.appUploadFilesImageFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.appUploadFilesImageFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void downloadFile(final Dialog dialog, String fileUrl, String fileForder, String fileName, final ModelCallback modelCallback) {

        Logger.i("downloadFileUrl:" + fileUrl);
        File f = new File(fileForder, fileName);
        if (f.exists()) {
            modelCallback.onDownloadFileSuccess(f);
            return;
        }

        OkGo.<File>get(fileUrl)//
                .tag(requestTag)//
                .headers("hader1", "haderValue1")//
                .params("param1", "paramValue1")//
                .execute(new FileCallback(fileForder, fileName) {

                    @Override
                    public void onStart(Request<File, ? extends Request> request) {
                        if (dialog != null && !dialog.isShowing()) {
                            dialog.show();
                        }
                        modelCallback.onDownloadFileStart();
                    }

                    @Override
                    public void onSuccess(com.lzy.okgo.model.Response<File> response) {
                        File f = response.body();
//                        new DownloadFileBroadcast(activity).sendDownloadSuccessBroadcast(f);
                        modelCallback.onDownloadFileSuccess(f);
                    }


                    @Override
                    public void onError(com.lzy.okgo.model.Response<File> response) {
                        modelCallback.onDownloadFileFail(response.getException());
                    }

                    @Override
                    public void downloadProgress(Progress progress) {
                        modelCallback.onDownloadFileProgress(progress);
                        System.out.println(progress);
                        Context context = (Context) requestTag;
                        String downloadLength = Formatter.formatFileSize(context, progress.currentSize);
                        String totalLength = Formatter.formatFileSize(context, progress.totalSize);
                        String speed = Formatter.formatFileSize(context, progress.speed);
                        String fraction = String.format("%.2f", progress.fraction * 100).toString() + "%";
                        if (dialog != null && dialog instanceof DownloadFileProgressDialog) {
                            ProgressBar progressBar = (ProgressBar) dialog.findViewById(R.id.pb_download_percent);
                            if (progressBar != null) {
                                progressBar.setMax(10000);
                                progressBar.setProgress((int) (progress.fraction * 10000));
                            }
                            TextView tvProgress = (TextView) dialog.findViewById(R.id.tv_download_percent);
                            if (tvProgress != null) {
//                                    tvProgress.setText(downloadLength + "/" + totalLength);
                                tvProgress.setText(fraction);
                            }
//                            TextView tvSpeed = dialog.findViewById(R.id.tv_speed);
//                            if (tvSpeed != null) {
//                                tvProgress.setText(speed);
//                            }
                        }
                    }

                    @Override
                    public void onFinish() {
                        modelCallback.onDownloadFileFinish();
                        if (dialog != null && dialog.isShowing()) {
                            dialog.dismiss();
                        }
                    }
                });
    }


    @Override
    public void xxxxxxxxxxxxxx应用相关结束xxxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx账户相关开始xxxxxxxxxxxxxx() {

    }

    private String parseParam(String url, String jsonParamStr) {
        if (!TextUtils.isEmpty(jsonParamStr)) {
            try {
                JSONObject jsonObject = new JSONObject(jsonParamStr);
                Iterator<String> it = jsonObject.keys();
                StringBuffer sbParam = new StringBuffer();
                while (it.hasNext()) {
                    String key = it.next();
                    String value = jsonObject.getString(key);
                    System.out.println("key: " + key + ",value:" + value);
                    sbParam.append(key + "=" + value + "&");
                }
                String paramStr = sbParam.toString();
                if (paramStr.endsWith("&")) {
                    paramStr = paramStr.substring(0, paramStr.length() - 1);
                }
                url = url + "?" + paramStr;
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
        return url;
    }

    @Override
    public void userLogin(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userLogin;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        final String phone = okgoParam.get("userNo");
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityUser entityUser = new EntityUser();
                                entityUser.setToken(data);
                                modelCallback.onUserLoginSuccess(entityUser);
                            } else {
                                modelCallback.onUserLoginFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserLoginFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserLoginFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userLogout(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userLogout;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityUser entityUser = GsonUtil.json2Bean(data, EntityUser.class);
                                modelCallback.onUserLogoutSuccess();
                            } else {
                                modelCallback.onUserLogoutFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserLogoutFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserLogoutFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void msgGetVerifyCode(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.msgGetVerifyCode;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);

        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onMsgGetVerifyCodeSuccess(data);
                            } else {
                                modelCallback.onMsgGetVerifyCodeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserLogoutFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserLogoutFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userRegister(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userRegister;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);


        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserRegisterSuccess();
                            } else {
                                modelCallback.onUserRegisterFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserRegisterFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserRegisterFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userResetPassword(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userResetPassword;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);

        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserResetPasswordSuccess(data);
                            } else {
                                modelCallback.onUserResetPasswordFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserResetPasswordFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserResetPasswordFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userForgetPassword(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userForgetPassword;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);

        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserForgetPasswordSuccess(data);
                            } else {
                                modelCallback.onUserForgetPasswordFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserForgetPasswordFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserForgetPasswordFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userBindEmail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userBindEmail;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserBindEmailSuccess(data);
                            } else {
                                modelCallback.onUserBindEmailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserBindEmailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserBindEmailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userGetUser(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userGetUser;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        HttpHeaders httpHeaders = OkGo.getInstance().getCommonHeaders();
        String header = httpHeaders.get("header");
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityUser entityUser = GsonUtil.json2Bean(data, EntityUser.class);
                                modelCallback.onUserGetUserSuccess(entityUser);
                            } else {
                                modelCallback.onUserGetUserFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserGetUserFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserGetUserFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userSendEmailVerifyCode(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userSendEmailVerifyCode;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserSendEmailVerifyCodeSuccess(data);
                            } else {
                                modelCallback.onUserSendEmailVerifyCodeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserSendEmailVerifyCodeFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserSendEmailVerifyCodeFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userSetPayPassword(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userSetPayPassword;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserSetPayPasswordSuccess(data);
                            } else {
                                modelCallback.onUserSetPayPasswordFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserSetPayPasswordFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserSetPayPasswordFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userUploadImg(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userUploadImg;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        String headUrl = "";
        try {
            JSONObject jsonObject = new JSONObject(jsonParam);
            headUrl = jsonObject.optString("headUrl");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        final String finalHeadUrl = headUrl;
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserUploadImgSuccess(finalHeadUrl);
                            } else {
                                modelCallback.onUserUploadImgFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserUploadImgFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserUploadImgFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void uploadPhoto(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.uploadPhoto;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        String imgUri = "";
        ArrayList<File> fileList = null;
        try {
            JSONObject param = new JSONObject(jsonParam);
            imgUri = param.getString("imgUri");
        } catch (Exception e) {
            e.printStackTrace();
        }
        File f = new File(imgUri);
        if (f.exists()) {
            fileList = new ArrayList<>();
            fileList.add(f);
        } else {
            return;
        }
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .isMultipart(true)
                .params("jsonparam", jsonParam)
                .addFileParams("file", fileList)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());
                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("responseCode");
                            String statusDesc = object.optString("responseMessage");
                            if (statusCode == 1) {
                                String data = object.optString("data");
                                modelCallback.onUploadPhotoSuccess(data);
                            } else {
                                modelCallback.onUploadPhotoFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUploadPhotoFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUploadPhotoFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userUpdateName(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userUpdateName;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());
                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserUpdateNameSuccess();
                            } else {
                                modelCallback.onUserUpdateNameFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserUpdateNameFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserUpdateNameFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userInvitationCode(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        final String url = ConstantURL.appServerHost + ConstantURL.userInvitationCode;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserInvitationCodeSuccess(data);
                            } else {
                                modelCallback.onUserInvitationCodeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserInvitationCodeFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserInvitationCodeFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userUpdatePhone(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userUpdatePhone;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserUpdatePhoneSuccess(data);
                            } else {
                                modelCallback.onUserUpdatePhoneFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserUpdatePhoneFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserUpdatePhoneFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getNoticeList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetNoticeList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityNotice> newsList = GsonUtil.json2BeanList(data, EntityNotice.class);
                                modelCallback.onGetNoticeListSuccess(newsList);
                            } else {
                                modelCallback.onGetNoticeListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetNoticeListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetNoticeListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getNewsList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetNewsList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityNews> newsList = GsonUtil.json2BeanList(data, EntityNews.class);
                                modelCallback.onGetNewsListSuccess(newsList);
                            } else {
                                modelCallback.onGetNewsListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetNewsListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetNewsListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getNewsDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetNewsById;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityNews news = GsonUtil.json2Bean(data, EntityNews.class);
                                modelCallback.onGetNewsDetailSuccess(news);
                            } else {
                                modelCallback.onGetNewsDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetNewsDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetNewsDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userFeedback(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.AddUserFeedback;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
//                                EntityNews news=GsonUtil.json2Bean(data, EntityNews.class);
                                modelCallback.onUserFeedbackSuccess();
                            } else {
                                modelCallback.onUserFeedbackFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserFeedbackFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserFeedbackFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getReceiveAddressList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetReceivingAddressList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityReceivingAddress> list = GsonUtil.json2BeanList(data, EntityReceivingAddress.class);
                                modelCallback.onGetReceiveAddressListSuccess(list);
                            } else {
                                modelCallback.onGetReceiveAddressListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetReceiveAddressListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetReceiveAddressListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void addReceiveAddress(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.AddReceivingAddress;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityReceivingAddress address = GsonUtil.json2Bean(data, EntityReceivingAddress.class);
                                modelCallback.onAddReceivingAddressSuccess();
                            } else {
                                modelCallback.onAddReceivingAddressFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAddReceivingAddressFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAddReceivingAddressFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void deleteReceiveAddress(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.deleteReceivingAddress;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityReceivingAddress address = GsonUtil.json2Bean(data, EntityReceivingAddress.class);
                                modelCallback.onDeleteReceivingAddressSuccess();
                            } else {
                                modelCallback.onDeleteReceivingAddressFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onDeleteReceivingAddressFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onDeleteReceivingAddressFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void updateReceiveAddress(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.ModifyReceivingAddress;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityReceivingAddress address = GsonUtil.json2Bean(data, EntityReceivingAddress.class);
                                modelCallback.onModifyReceivingAddressSuccess();
                            } else {
                                modelCallback.onModifyReceivingAddressFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onModifyReceivingAddressFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onModifyReceivingAddressFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getUserCommunity(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetUserCommunity;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityMyCommunity myCommunity = GsonUtil.json2Bean(data, EntityMyCommunity.class);
                                modelCallback.onGetUserCommunitySuccess(myCommunity);
                            } else {
                                modelCallback.onGetUserCommunityFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetUserCommunityFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetUserCommunityFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx账户相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx首页相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void getAssetsList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getAssetsList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityAssetsBag> assetsBagList = GsonUtil.json2BeanList(data, EntityAssetsBag.class);
                                modelCallback.onGetAssetsListSuccess(assetsBagList);
                            } else {
                                modelCallback.onGetAssetsListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetAssetsListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetAssetsListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getAssetsDetailById(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getAssetsDetail;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAssetsBag bag = GsonUtil.json2Bean(data, EntityAssetsBag.class);
                                modelCallback.onGetAssetsDetailSuccess(bag);
                            } else {
                                modelCallback.onGetAssetsDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetAssetsDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetAssetsDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void BuyAssets(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.buyAssets;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onBuyAssetsSuccess();
                            } else {
                                modelCallback.onBuyAssetsFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onBuyAssetsFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onBuyAssetsFail(new Exception(response.getException() + ""));
                    }
                });
    }


    @Override
    public void xxxxxxxxxxxxxx首页相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx算码相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void openBuyMiner(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.openBuyMiner;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                JSONObject dataObj = object.optJSONObject("data");
                                String price = dataObj.optString("price");
                                String buyMinerProportion = dataObj.optString("buyMinerProportion");

                                modelCallback.onOpenBuyMinerSuccess(price, buyMinerProportion);
                            } else {
                                modelCallback.onOpenBuyMinerFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onOpenBuyMinerFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onOpenBuyMinerFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void buyMiner(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.buyMiner;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onBuyMinerSuccess();
                            } else {
                                modelCallback.onBuyMinerFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onBuyMinerFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onBuyMinerFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryMinerProfitList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.minerProfitList;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityComputeCodeEarningRecord> list = GsonUtil.json2BeanList(data, EntityComputeCodeEarningRecord.class);
                                modelCallback.onQueryMinerProfitListSuccess(list);
                            } else {
                                modelCallback.onQueryMinerProfitListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onQueryMinerProfitListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onQueryMinerProfitListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryUserMinerList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userMinerList;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        HttpHeaders h = OkGo.getInstance().getCommonHeaders();
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityMyComputeCode entityMyComputeCode = GsonUtil.json2Bean(data, EntityMyComputeCode.class);
                                modelCallback.onQueryUserMinerListSuccess(entityMyComputeCode);
                            } else {
                                modelCallback.onQueryUserMinerListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onQueryUserMinerListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onQueryUserMinerListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void minerPayDeposit(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.minerPayDeposit;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        HttpHeaders h = OkGo.getInstance().getCommonHeaders();
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onMinerPayDepositSuccess(data);
                            } else {
                                modelCallback.onMinerPayDepositFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onMinerPayDepositFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onMinerPayDepositFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void minerReturnDeposit(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.minerReturnDeposit;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        HttpHeaders h = OkGo.getInstance().getCommonHeaders();
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onMinerReturnDepositSuccess(data);
                            } else {
                                modelCallback.onMinerReturnDepositFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onMinerReturnDepositFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onMinerReturnDepositFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx算码相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx订单相关开始xxxxxxxxxxxxxx() {

    }

    @Override
    public void orderApply(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.orderApply;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onOrderApplySuccess();
                            } else {
                                modelCallback.onOrderApplyFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onOrderApplyFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onOrderApplyFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getOrderDetails(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getOrderDetails;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onGetOrderDetailsSuccess();
                            } else {
                                modelCallback.onGetOrderDetailsFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetOrderDetailsFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetOrderDetailsFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getOrderBuyAndSaleList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getBuyAndSeleOrderList;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("orderList");
                                List<EntityOrder> orderList = GsonUtil.json2BeanList(data, EntityOrder.class);
                                modelCallback.onGetOrderBuyAndSellListSuccess(orderList);
                            } else {
                                modelCallback.onGetOrderBuyAndSellListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetOrderBuyAndSellListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetOrderBuyAndSellListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getOrderWithTradeList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getOrderWithTradeList;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("orderList");
                                List<EntityOrderWithTrade> orderList = GsonUtil.json2BeanList(data, EntityOrderWithTrade.class);
                                modelCallback.onGetOrderWithTradeListSuccess(orderList);
                            } else {
                                modelCallback.onGetOrderWithTradeListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetOrderWithTradeListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetOrderWithTradeListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void updateOrderStatus(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.updateOrderStatus;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUpdateOrderStatusSuccess();
                            } else {
                                modelCallback.onUpdateOrderStatusFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUpdateOrderStatusFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUpdateOrderStatusFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void uploadVoucher(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.uploadVoucher;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUploadVoucherSuccess();
                            } else {
                                modelCallback.onUploadVoucherFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUploadVoucherFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUploadVoucherFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void orderRevoke(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.revokeOrder;
        url = parseParam(url,jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onOrderRevokeSuccess();
                            } else {
                                modelCallback.onOrderRevokeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onOrderRevokeFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onOrderRevokeFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx订单相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx资产相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void getUserBurseCoinNumberList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.burseCoinNumber;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityBurseCoinNumber entityBurseCoinNumber = GsonUtil.json2Bean(data, EntityBurseCoinNumber.class);
                                modelCallback.onGetUserBurseCoinNumberListSuccess(entityBurseCoinNumber);
                            } else {
                                modelCallback.onGetUserBurseCoinNumberListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetUserBurseCoinNumberListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetUserBurseCoinNumberListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getServiceChargePercent(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.ServiceChargePercent;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                double data = object.optDouble("data");
                                modelCallback.onGetServiceChargePercentSuccess(data);
                            } else {
                                modelCallback.onGetServiceChargePercentFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetServiceChargePercentFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetServiceChargePercentFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void transferAccounts(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transferAccounts;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                modelCallback.onTransferAccountsSuccess();
                            } else {
                                modelCallback.onTransferAccountsFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onTransferAccountsFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onTransferAccountsFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getUserBurseList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetUserBurseList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityBurseRecord> entityBurseRecordList = GsonUtil.json2BeanList(data, EntityBurseRecord.class);
                                modelCallback.onGetUserBurseListSuccess(entityBurseRecordList);
                            } else {
                                modelCallback.onGetUserBurseListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetUserBurseListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetUserBurseListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getUserBurseDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.GetUserBurseDetail;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityBurseRecordDetail detail = GsonUtil.json2Bean(data, EntityBurseRecordDetail.class);
                                modelCallback.onGetUserBurseDetailSuccess(detail);
                            } else {
                                modelCallback.onGetUserBurseDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetUserBurseDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetUserBurseDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void addPartnerApply(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.AddPartnerApply;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityPartnerApply detail = GsonUtil.json2Bean(data, EntityPartnerApply.class);
                                modelCallback.onAddPartnerApplySuccess(detail);
                            } else {
                                modelCallback.onAddPartnerApplyFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAddPartnerApplyFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAddPartnerApplyFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void assetGTEOverview(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.assetGTEOverview;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAssetGTEOverview entityAssetGTEOverview = GsonUtil.json2Bean(data, EntityAssetGTEOverview.class);
                                modelCallback.onAssetGTEOverviewSuccess(entityAssetGTEOverview);
                            } else {
                                modelCallback.onAssetGTEOverviewFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAssetGTEOverviewFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAssetGTEOverviewFail(new Exception(response.getException() + ""));
                    }
                });
    }


    @Override
    public void assetGTEDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.assetGTEDetail;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAssetGTEDetail entityAssetGTEDetail = GsonUtil.json2Bean(data, EntityAssetGTEDetail.class);
                                modelCallback.onAssetGTEDetailSuccess(entityAssetGTEDetail);
                            } else {
                                modelCallback.onAssetGTEDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAssetGTEDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAssetGTEDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void assetGTKOverview(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.assetGTKOverview;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAssetGTKOverview entityAssetGTKOverview = GsonUtil.json2Bean(data, EntityAssetGTKOverview.class);
                                modelCallback.onAssetGTKOverviewSuccess(entityAssetGTKOverview);
                            } else {
                                modelCallback.onAssetGTKOverviewFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAssetGTKOverviewFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAssetGTKOverviewFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void assetGTKDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.assetGTKDetail;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityAssetGTKDetail entityAssetGTKDetail = GsonUtil.json2Bean(data, EntityAssetGTKDetail.class);
                                modelCallback.onAssetGTKDetailSuccess(entityAssetGTKDetail);
                            } else {
                                modelCallback.onAssetGTKDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAssetGTKDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAssetGTKDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void assetDetailRecord(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.assetDetailRecord;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityAssetDetailRecord> entityAssetDetailRecordList = GsonUtil.json2BeanList(data, EntityAssetDetailRecord.class);
                                modelCallback.onAssetDetailRecordSuccess(entityAssetDetailRecordList);
                            } else {
                                modelCallback.onAssetDetailRecordFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAssetDetailRecordFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAssetDetailRecordFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void otherAsset(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.otherAsset;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        String type = "";
        try {
            JSONObject jsonObject = new JSONObject(jsonParam);
            type = jsonObject.optString("type");
            url +=type;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        final String finalType = type;
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            String ticker = object.optString("ticker");
                            EntityOtherAssets entityOtherAssets = GsonUtil.json2Bean(ticker,EntityOtherAssets.class);
                            if(entityOtherAssets != null){
                                modelCallback.onOtherAssetSuccess(finalType,entityOtherAssets);
                            }else{
                                modelCallback.onOtherAssetFail(new Exception("暂无数据"));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onOtherAssetFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onOtherAssetFail(new Exception(response.getException() + ""));
                    }
                });
    }


    @Override
    public void xxxxxxxxxxxxxx资产相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx社区相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void communityLevelList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.communityLevelList;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                if (!TextUtils.isEmpty(data)) {
                                    List<EntityCommunityLevelMember> entityCommunityLevelMemberList = GsonUtil.json2BeanList(data, EntityCommunityLevelMember.class);
                                    modelCallback.onCommunityLevelListSuccess(entityCommunityLevelMemberList);
                                } else {
                                    modelCallback.onCommunityLevelListFail(new Exception(statusDesc));
                                }
                            } else {
                                modelCallback.onCommunityLevelListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onCommunityLevelListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onCommunityLevelListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void communityOverview(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.communityOverview;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                EntityCommunity entityCommunity = GsonUtil.json2Bean(object.toString(), EntityCommunity.class);
                                modelCallback.onCommunityOverviewSuccess(entityCommunity);
                            } else {
                                modelCallback.onCommunityOverviewFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onCommunityOverviewFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onCommunityOverviewFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx社区相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx币种转化相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void transferRecharge(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transferRecharge;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onTransferRechargeSuccess(data);
                            } else {
                                modelCallback.onTransferRechargeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onTransferRechargeFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onTransferRechargeFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void transferTransfer(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transferTransfer;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        HttpHeaders header = OkGo.getInstance().getCommonHeaders();
        String token = header.get("token");
        sblog.append("\n\ntoken:" + token);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onTransferTransferSuccess(data);
                            } else {
                                modelCallback.onTransferTransferFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onTransferTransferFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onTransferTransferFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void transferOpenTransfer(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transferOpenTransfer;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onTransferOpenTransferSuccess(data);
                            } else {
                                modelCallback.onTransferOpenTransferFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onTransferOpenTransferFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onTransferOpenTransferFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx币种转化相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx支付相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void paymentPay(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.paymentPay;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onPaymentPaySuccess(data);
                            } else {
                                modelCallback.onPaymentPayFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onPaymentPayFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onPaymentPayFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx支付相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx交易相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void queryBBValue(final int bbType, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = "";
        switch (bbType) {
            case ConstantParam.BBTRADE_TYPE_WITH_BTC:
                url = "http://api.zb.cn/data/v1/ticker?market=btc_qc";

                break;
            case ConstantParam.BBTRADE_TYPE_WITH_ETH:
                url = " http://api.zb.cn/data/v1/ticker?market=eth_qc";

                break;
            case ConstantParam.BBTRADE_TYPE_WITH_XRP:
                url = "http://api.zb.cn/data/v1/ticker?market=xrp_qc";

        }
        sblog.append("\n\nurl:" + url + "\n");
        OkGo.<String>get(url)//
                .tag(requestTag)//
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            JSONObject obj = object.optJSONObject("ticker");

                            String rmb = obj.optString("last");
                            modelCallback.onQueryBBValueSuccess(bbType, rmb);


                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onQueryBBValueFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onQueryBBValueFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryTradePriceData(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.tradePriceData;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityTradePriceData entityTradePriceData = GsonUtil.json2Bean(data, EntityTradePriceData.class);
                                modelCallback.onQueryTradePriceDataSuccess(entityTradePriceData);
                            } else {
                                modelCallback.onQueryTradePriceDataFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onQueryTradePriceDataFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onQueryTradePriceDataFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryTransactionOrderList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transactionOrderList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityOrderWithTrade> list = GsonUtil.json2BeanList(data, EntityOrderWithTrade.class);
                                modelCallback.queryTransactionOrderListSuccess(list);
                            } else {
                                modelCallback.queryTransactionOrderListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.queryTransactionOrderListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.queryTransactionOrderListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void cancelUntradeOrder(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.cancelUntradeOrder;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onCancelUnTradeTransactionOrderSuccess();
                            } else {
                                modelCallback.onCancelUnTradeTransactionOrderFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onCancelUnTradeTransactionOrderFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onCancelUnTradeTransactionOrderFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void transOverview(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.transOverview;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onTransOverviewSuccess(data);
                            } else {
                                modelCallback.onTransOverviewFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onTransOverviewFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onTransOverviewFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void gteBuyOrSell(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.gteBuyOrSale;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.gteBuyOrSellSuccess(data);
                            } else {
                                modelCallback.gteBuyOrSellFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.gteBuyOrSellFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.gteBuyOrSellFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryTradeBuyAndSellDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.gteBuyOrSaleDetail;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                String detailStr = object.optString("orderBuySaleDetail");
                                EntityTradeOrderDeatil order = GsonUtil.json2Bean(detailStr, EntityTradeOrderDeatil.class);
                                modelCallback.onQueryTradeBuyAndSellDetailSuccess(order);
                            } else {
                                modelCallback.onQueryTradeBuyAndSellDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onQueryTradeBuyAndSellDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onQueryTradeBuyAndSellDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void queryOrderDetail(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.orderDetail;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityOrderDetail order = GsonUtil.json2Bean(data, EntityOrderDetail.class);
                                if (order != null) {
                                    String paySuccessImg = order.getPaySuccessImg();
                                }
                                modelCallback.onqueryOrderDetailSuccess(order);
                            } else {
                                modelCallback.onqueryOrderDetailFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onqueryOrderDetailFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onqueryOrderDetailFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void cancelTradingOrder(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.cancelTradingOrder;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onCancelBuyAndSellOrderSuccess();
                            } else {
                                modelCallback.onCancelTradingOrderFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onCancelTradingOrderFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onCancelTradingOrderFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void confirmPayGte(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.confirmPayGte;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onConfirmPayGteSuccess();
                            } else {
                                modelCallback.onConfirmPayGteFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onConfirmPayGteFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onConfirmPayGteFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void payMoney(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.buyerPayMoney;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onPayMoneySuccess();
                            } else {
                                modelCallback.onPayMoneyFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onPayMoneyFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onPayMoneyFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void userBuyTrade(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.userBuyTrade;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);

        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onUserBuyTradeSuccess();
                            } else {
                                modelCallback.onUserBuyTradeFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onUserBuyTradeFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onUserBuyTradeFail(new Exception(response.getException() + ""));
                    }
                });
    }


    @Override
    public void xxxxxxxxxxxxxx交易相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx验证相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void verifyGeneralAuth(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.verifyGeneralAuth;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityGeneralAuth entityGeneralAuth = GsonUtil.json2Bean(data, EntityGeneralAuth.class);
                                modelCallback.onVerifyGeneralAuthSuccess(data);
                            } else {
                                modelCallback.onVerifyGeneralAuthFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onVerifyGeneralAuthFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onVerifyGeneralAuthFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void verifySafeAuth(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.verifySafeAuth;
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onVerifySafeAuthSuccess(data);
                            } else {
                                modelCallback.onVerifySafeAuthFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onVerifySafeAuthFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onVerifySafeAuthFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void isGeneralAuth(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getGeneralAuth;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");

                                List<EntityGeneralAuth> entityGeneralAuthList = GsonUtil.json2BeanList(data, EntityGeneralAuth.class);
                                if (entityGeneralAuthList != null && entityGeneralAuthList.size() > 0) {
                                    EntityGeneralAuth entityGeneralAuth = entityGeneralAuthList.get(0);
                                    modelCallback.onGetIsGeneralAuthSuccess(entityGeneralAuth);
                                } else {
                                    modelCallback.onGetIsGeneralAuthFail(new Exception(statusDesc + ""));
                                }
                            } else {
                                modelCallback.onGetIsGeneralAuthFail(new Exception(statusDesc + ""));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetIsGeneralAuthFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetIsGeneralAuthFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx验证相关结束xxxxxxxxxxxxx() {

    }

    @Override
    public void xxxxxxxxxxxxxx行权相关开始xxxxxxxxxxxxx() {

    }

    @Override
    public void addExerciseOrder(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.addExercise;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                modelCallback.onAddExerciseOrderSuccess(data);
                            } else {
                                modelCallback.onAddExerciseOrderFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onAddExerciseOrderFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onAddExerciseOrderFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getExerciseOrderList(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getExerciseList;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                List<EntityExercise> entityExerciseList = GsonUtil.json2BeanList(data, EntityExercise.class);
                                modelCallback.onGetExerciseOrderListSuccess(entityExerciseList);
                            } else {
                                modelCallback.onGetExerciseOrderListFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetExerciseOrderListFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetExerciseOrderListFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void getExerciseOrder(String jsonParam, final ModelCallback modelCallback) {
        final StringBuffer sblog = new StringBuffer();
        String url = ConstantURL.appServerHost + ConstantURL.getExercise;
        url = parseParam(url, jsonParam);
        sblog.append("\n\nurl:" + url + "\n\nparam:" + jsonParam);
        Map<String, String> okgoParam = GsonUtil.json2Map(jsonParam);
        OkGo.<String>post(url)//
                .tag(requestTag)//
                .params(okgoParam)
                .execute(new OkgoDialogWithStringCallback((Context) requestTag) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        sblog.append("\n\n resp:" + response.body());

                        try {
                            JSONObject object = new JSONObject(response.body());
                            int statusCode = object.optInt("statusCode");
                            String statusDesc = object.optString("message");
                            if (statusCode == ConstantParam.REQUEST_RESPONSE_CODE_WITH_SUCCESS) {
                                String data = object.optString("data");
                                EntityExercise entityExercise = GsonUtil.json2Bean(data, EntityExercise.class);
                                modelCallback.onGetExerciseOrderSuccess(entityExercise);
                            } else {
                                modelCallback.onGetExerciseOrderFail(new Exception(statusDesc));
                            }

                        } catch (Exception e) {
                            e.printStackTrace();
                            sblog.append("\n\n exception:" + e.getMessage() + "");
                            modelCallback.onGetExerciseOrderFail(new Exception(e));
                        }
                        Logger.i(sblog.toString());
                    }

                    @Override
                    public void onError(Response<String> response) {
                        super.onError(response);
                        sblog.append("\n\nresp:" + response.getException().getMessage());
                        Logger.i(sblog.toString());
                        modelCallback.onGetExerciseOrderFail(new Exception(response.getException() + ""));
                    }
                });
    }

    @Override
    public void xxxxxxxxxxxxxx行权相关结束xxxxxxxxxxxxx() {

    }
}
